﻿using DevExpress.XtraBars.Ribbon;
using DevExpress.XtraReports.UI;
using DevExpress.XtraReports.UserDesigner;
using System;
using System.Drawing;
using System.Globalization;
using System.Threading;
using System.Windows.Forms;

namespace XCI.App
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("zh-Hans");
            //DevExpress.Utils.AppearanceObject.DefaultFont = new Font("微软雅黑", 9.75F);
            XtraReport report = new XtraReport { Font = new Font("微软雅黑", 9.75f) };
            XRDesignRibbonFormEx frmDesign = new XRDesignRibbonFormEx();
            frmDesign.OpenReport(report);
            frmDesign.DesignRibbonController.RibbonControl.ToolbarLocation = RibbonQuickAccessToolbarLocation.Hidden;
            frmDesign.DesignPanel.SetCommandVisibility(new[]
            {
                ReportCommand.NewReportWizard
            }, DevExpress.XtraReports.UserDesigner.CommandVisibility.None);

            frmDesign.SetWindowVisibility(DesignDockPanelType.ReportGallery
                | DesignDockPanelType.ErrorList
                | DesignDockPanelType.GroupAndSort, false);
            frmDesign.ShowDialog();
            frmDesign.Dispose();
        }
    }
}
